<html lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title></title>
		<script src="/FXT/search/AC_OETags.js" language="javascript"></script>
		<style>
			body { margin: 0px; overflow:hidden }
		</style>
		<script language="JavaScript" type="text/javascript">
			<!--
				var requiredMajorVersion = 9;
				var requiredMinorVersion = 0;
				var requiredRevision = 0;
			// -->
		</script>
	</head>

	<body scroll="no">
	
		<script type="text/xml">
			<!--FXT START MODEL-->
			<FXTModel>
<?php

	$Command = split( '/' , $id );

	//return search
	if( count( $Command ) > 0 && $id != "" ){

		if( !is_numeric( $Command[0] ) ){
			array_unshift( $Command , "1" );
		}

		$start = array_shift( $Command );
		$query = implode(" " , $Command );	
	
		$appid = 'adobeted247';
		
		$q = '?query=' . rawurlencode( $query ); 
		$q .= '&start=' . $start;
		$q .= "&results=19&appid=$appid&";
		
		echo( '<Layout type="result"/>');
		echo( '<Request query="' . $query . '" start="' . $start . '"/>');
		
		$xml = simplexml_load_file( 'http://api.search.yahoo.com/WebSearchService/V1/webSearch' . $q )->asXML();
		$xml = str_replace( '<?xml version="1.0" encoding="UTF-8"?>' , '' , $xml );
		$xml = str_replace( 'xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="urn:yahoo:srch" xsi:schemaLocation="urn:yahoo:srch http://api.search.yahoo.com/WebSearchService/V1/WebSearchResponse.xsd" ' , '' , $xml );

		echo( $xml );
	
	//error case
	}else{
		echo( '<Layout type="form"/>');
		echo( '<Request query="' . $query . '"/>');
	}	

?>
			</FXTModel>
			<!--FXT END MODEL-->
		</script>
	
		<script language="JavaScript" type="text/javascript" src="/FXT/search/history.js"></script>
		<script language="JavaScript" type="text/javascript">
			<!--
				var hasProductInstall = DetectFlashVer(6, 0, 65);
				var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
				if ( hasProductInstall && !hasRequestedVersion ) {
					var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
					var MMredirectURL = window.location;
				    	document.title = document.title.slice(0, 47) + " - Flash Player Installation";
					var MMdoctitle = document.title;				
					AC_FL_RunContent(
						"src", "/FXT/search/playerProductInstall",
						"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
						"width", "100%",
						"height", "100%",
						"align", "middle",
						"id", "view",
						"quality", "high",
						"bgcolor", "#FFFFFF",
						"name", "view",
						"allowScriptAccess","sameDomain",
						"type", "application/x-shockwave-flash",
						"pluginspage", "http://www.adobe.com/go/getflashplayer"
					);
				} else if (hasRequestedVersion) {
					AC_FL_RunContent(
							"src", "/FXT/search/view",
							"width", "100%",
							"height", "100%",
							"align", "middle",
							"id", "view",
							"quality", "high",
							"bgcolor", "#FFFFFF",
							"name", "view",
							"flashvars",'historyUrl=/FXT/search/history.htm%3F&lconid=' + lc_id + '&model='+ escape( document.body.innerHTML ) +'',
							"allowScriptAccess","sameDomain",
							"type", "application/x-shockwave-flash",
							"pluginspage", "http://www.adobe.com/go/getflashplayer"
					);
				} else {
				    var alternateContent = 'Alternate HTML content should be placed here. '
				  	+ 'This content requires the Adobe Flash Player. '
				   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
				    document.write(alternateContent);  
				}
			// -->
		</script>
		<noscript>
		</noscript>
		<iframe name="_history" src="/FXT/search/history.htm" frameborder="0" scrolling="no" width="22" height="0"></iframe>
	</body>
</html>
